package cn.aitstone.controller;

import cn.aitstone.entity.User;
import cn.aitstone.feign.UserFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class PayController {
    @Autowired
    private UserFeign userFeign;

    @GetMapping ("/pay/{id}")
    public User getById(@PathVariable("id")Long id){
        //使用Feign调用用户服务获取User
        return userFeign.getById(id);
    }
}
